home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Extensions… / Additions ƒ / InitializeMessage.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-10  |  1.5 KB  |  87 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2.  
  3.     FILENAME
  4.         InitializeMessage.c
  5.  
  6.     DESCRIPTION
  7.         This file contains the message procedure that will be invoked when the Printing Manager
  8.         issues the Initialize message.
  9.  
  10.     COPYRIGHT
  11.         Copyright Apple Computer, Inc. 1991
  12.         All rights reserved. 
  13.     
  14.     INTERFACE ROUTINES
  15.         InitializeMessageProc
  16.  
  17.     MODIFICATION HISTORY
  18.         12/03/91            Sam Weiss                Initial Implementation
  19.  
  20.  
  21. ------------------------------------------------------------------------------- */
  22.  
  23. #include <Types.h>
  24. #include <Quickdraw.h>
  25. #include <Memory.h>
  26. #include <Resources.h>
  27. #include <Dialogs.h>
  28. #include <TextEdit.h>
  29. #include <OSUtils.h>
  30. #include <Packages.h>
  31. #include <ToolUtils.h>
  32. #include <Menus.h>
  33. #include <String.h>
  34. #include <Strings.h>
  35. #include <Printing.h>
  36. #include <FixMath.h>
  37.  
  38. #include <graphics routines.h>
  39.  
  40. #include <Collections.h>
  41. #include <Messages.h>
  42.  
  43. #include    <PrintingManager.h>
  44. #include    <PrintingMessages.h>
  45.  
  46. #include    <Additions.h>
  47.  
  48.  
  49. extern long A5Size (void);
  50. extern void A5Init (void *);
  51.  
  52.  
  53. // Globals...
  54.  
  55.  
  56. gxShape gSerialShape;
  57.  
  58.  
  59. //------------------------------------------------------------------------------------
  60.  
  61. /*
  62.     Name:                    InitializeMessageProc
  63.     
  64.     Description:        Initialize the universal driver.
  65.  
  66.     Parameters:            long:                unused context
  67.     
  68.     Returns:                OSErr
  69.     
  70.     Preconditions:        none
  71.                                 
  72.     Postconditions:    none
  73.     
  74. */
  75.  
  76. OSErr InitializeMessageProc (void) {
  77.  
  78.     OSErr anErr;
  79.     
  80.     anErr = NewMessageGlobals(A5Size(), A5Init);
  81.     
  82.     if (!anErr)
  83.         gSerialShape = NULL;
  84.     
  85.     return anErr;
  86. }
  87.